//package com.inossem.warehousemanage_tv.iot;
//
//import android.app.Activity;
//import android.support.v7.widget.DividerItemDecoration;
//import android.support.v7.widget.LinearLayoutManager;
//import android.support.v7.widget.RecyclerView;
//import android.view.View;
//
//import com.inossem.warehousemanage_tv.bean.BaseBean;
//import com.inossem.warehousemanage_tv.service.IOTService;
//import com.inossem.warehousemanage_tv.utils.requestUtils.InossemCallback;
//import com.inossem.warehousemanage_tv.utils.requestUtils.RetrofitUtils;
//import com.wms.vo.input.BizStockInputInfoDataVo;
//
//import java.util.List;
//
//import retrofit2.Response;
//
//import static android.widget.LinearLayout.VERTICAL;
//
//
//public class IOTActivity extends Activity {
//    private RecyclerView view;
//    private InStockMaterialAdapter adapter;
//    private View includeNoData;
//
//    @Override
//    protected void onDestroy() {
//        super.onDestroy();
//    }
//
//    @Override
//    public int initLayout() {
//        return R.layout.activity_iot;
//    }
//
//    @Override
//    public void initView() {
//        RetrofitUtils.getRetrofit(IOTActivity.this, getString(R.string.developer_linhao), getString(R.string.developer_yuelingyun), "IOT", "IOT")
//                .create(IOTService.class)
//                .rfidGetConfRid()
//                .enqueue(new InossemCallback<BaseBean<List<ConfRidBean>>>() {
//                    @Override
//                    public void success(Response<BaseBean<List<ConfRidBean>>> response) {
//                        SendSocketData data = new SendSocketData(response.body().getBody().get(0).getSocketUrl(), response.body().getBody().get(0).getSocketPort());
//                        data.setOnButtonClickListener(s -> {
//                            IotBean bean = new IotBean();
//                            bean.setRfId(s);
//                            RetrofitUtils
//                                    .getRetrofit(IOTActivity.this, getString(R.string.developer_linhao), getString(R.string.developer_yuelingyun), "IOT", "IOT")
//                                    .create(IOTService.class)
//                                    .rfidToShow(bean)
//                                    .enqueue(new InossemCallback<BaseBean<BizStockInputInfoDataVo>>() {
//                                        @Override
//                                        public void success(Response<BaseBean<BizStockInputInfoDataVo>> response1) {
//                                            includeNoData.setVisibility(View.GONE);
//                                            adapter = new InStockMaterialAdapter();
//                                            adapter.notifyDataSetChangedList(response1.body().getBody().getItemList());
//                                            view.setAdapter(adapter);
//                                        }
//
//                                        @Override
//                                        public void failure(Response<BaseBean<BizStockInputInfoDataVo>> response1) {
//                                            includeNoData.setVisibility(View.VISIBLE);
//                                        }
//                                    });
//                        });
//                    }
//
//                    @Override
//                    public void failure(Response<BaseBean<List<ConfRidBean>>> response) {
//
//                    }
//                });
//        view = findViewById(R.id.rv);
//        includeNoData = findViewById(R.id.include_no_data);
//        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
//        layoutManager.setOrientation(VERTICAL);
//        view.setLayoutManager(layoutManager);
//        view.addItemDecoration(new DividerItemDecoration(this, VERTICAL));
//    }
//
//    @Override
//    public void initData() {
//        includeNoData.setVisibility(View.VISIBLE);
//    }
//}